package com.yjy.state_machine.v3;

public class MainTest {
    public static void main(String[] args) {
        OrderContext context = new OrderContext();

        // 创建订单
        context.setStateHandler(new CreateStateHandler());
        context.handle();

        // 付款
        context.setStateHandler(new PayingStateHandler());
        context.handle();

        // 支付完成后，进入【待发货】
        context.setStateHandler(new PayFinishStateHandler());
        context.handle();
    }
}
